package ar.edu.unicen.pladema.vc1.formats.sur;

public class DefaultReader implements IReader {

	@Override
	public IReader readed(String token, Data3D data3d) {
		IReader response = readers(token, this);
		if (response != null) {
			return response;
		}
		return this;
	}

	public static IReader readers(String token, IReader thisOne) {
		if (token.equals("")) {return thisOne;}
		if (token.equals("*INCIDENCE")) {
			return new TriangleReader();
		}
		if (token.equals("*ELEMENT")) {
			return new DefaultReader();
		}
		if (token.equals("*FRONT_VOLUME")) {
			return new DefaultReader();
		}
		if (token.equals("*COORDINATES")) {
			return new VertexReader();
		}
		
		return null;
	}
}
